package cn.edu.gench.learn.day4;

/**
 * Created by Administrator on 2017/3/31.
 *
 *   封装
 *   继承
 *   多态
 */
public class ObjectTest extends Object {

    public String name;

    private Integer gender;//除了在这个类里面是不能被使用

    protected Integer age; //
    //default
    float wright;

    private final static String worker = "";

    static{
        System.out.println("static.......");
    }

    public ObjectTest() {
        System.out.println("init.......");
    }

    public ObjectTest(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        //reutrun super.toString()
         //      this.toString()
        return "ObjectTest{" +
                "name='" + name + '\'' +
                ", gender=" + gender +
                ", age=" + age +
                ", wright=" + wright +
                '}';
    }

    public ObjectTest(String name, Integer gender, Integer age, float wright) {
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.wright = wright;
    }



    public static void main(String[] args) {
        System.out.println(new  ObjectTest());
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public float getWright() {
        return wright;
    }

    public void setWright(float wright) {
        this.wright = wright;
    }


}
